(ns com.yawmark.euler.clj.e2
    (:use [clojure.contrib.lazy-seqs :only (fibs)]))

(defn euler-2
      "By considering the terms in the Fibonacci sequence 
      whose values do not exceed four million, find the sum
      of the even-valued terms."
      []
      (reduce + (filter even? (take-while #(< % 4000000) (fibs)))))

(println (time (euler-2)))
